export default function useBase() {

  let isAgree =  false
  let isOtherLogin= false
  let showAnim = false
  let showTooltip = false
  let loading =  false

  const check = async (resolve) => {
    if (isAgree) {
      resolve(true)
    } else {
      if (!showAnim && !showTooltip) {
        showAnim = true
        setTimeout(() => {
          showAnim = false
          showTooltip = true
        }, 500)
        setTimeout(() => {
          showTooltip = false
        }, 3000)
      }
    }
  }

  return {
    isAgree,
    isOtherLogin,
    showAnim,
    showTooltip,
    loading,
    check
  }
}
